<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="content-type" content="text/html;charset=utf-8">
	<title>D 生活</title>
    <%@include file="/views/common/include/taglib.jsp"%>
    <%@include file="/views/common/include/head.jsp"%>
    <link rel="stylesheet" href="${ctx}/css/page/order-detail.css" type="text/css">
    <link rel="stylesheet" href="${ctx}/css/page/header2.css" type="text/css">
	<link rel="stylesheet" href="${ctx}/css/page/reset.css" type="text/css">
	<link rel="stylesheet" href="${ctx}/css/page/person-left.css" type="text/css">
	<link rel="stylesheet" href="${ctx}/css/page/footer.css" type="text/css">

<style type="text/css">
.title-left {
	float: left;
	color: #000;
}
.title-right {
    float: right;
    color: #F28358;
}
</style>

<script src="${ctx}/js/controllers/mall/order/orderListController.js" type="text/javascript"></script>
</head>
	
<body>
	<jsp:include page="/views/common/head_main.jsp" />
	<div class="bg">
		<div class="contentbox1 contentbox">
			<div class="leftlist">
		        <div class="myorder left">
					<ul>
						<li><a class="order" href="${ctx}/orderInfo/orderInfoListByState" >我的订单</a></li>
						<li><a href="${ctx}/orderInfo/orderInfoListByState?states=0">待付款</a></li>
						<li><a href="${ctx}/orderInfo/orderInfoListByState?states=1">待商家确认</a></li>
						<li><a href="${ctx}/orderInfo/orderInfoListByState?states=2">待发货</a></li>
						<li><a href="${ctx}/orderInfo/orderInfoListByState?states=3,14">待收货</a></li>
						<li><a href="${ctx}/orderInfo/orderInfoListByState?states=6,7,8,10,11,12,13">退款售后</a></li>
					</ul>
				</div>
				<div class="myproperty left">
					<ul>
						<li class="order">我的物业</li>
						<c:if test="${displayFeeBill == 1}">
						<li><a href="${ctx}/propertyBill/getMyBill">我的物业费</a></li>
						</c:if>
						<c:if test="${displayCar == 1}">
						<li><a href="${ctx}/carBill/getCarManage">我的停车费</a></li>
						</c:if>
						<li><a href="${ctx}/propertyRepair/infoList">我的物业报修</a></li>
						<li><a href="${ctx}/propertySuggestion/infoList">我的物业投诉</a></li>
					</ul>
				</div>
				<div class="myassets left">
					<ul>
						<li class="order">我的资产</li>
					    <li><a  href="${ctx}/ownerTreasure/ownerIntegralChangeList?state=0&pNo=1">我的积分</a></li>
						<li><a style="" href="${ctx}/ownerTreasure/getCouponList?pNo=1">优惠券</a></li>
					</ul>
				</div>
				<div class="otherlist left">
					<ul class="others">
						<li class="order">其他</li>
						<li><a  href="${ctx}/ownerOther/getMyCollection">我的收藏</a></li>
						<li><a  href="${ctx}/ownerAddress/ownerAddressList">我的收货地址</a></li>
						<li><a href="${ctx}/complaintsInfo/infoList">我的投诉建议</a></li>
						<li><a href="${ctx}/ownerHouse/ownerHouseList">我的小区</a></li>
						<!-- position需要跳转到特定位置 -->
						<li><a href="${ctx}/main?item=1#openShop">我要开店</a></li>
						<li><a href="${ctx}/usualQuestions/infoList">常见问题</a></li>
					</ul>
				</div>
			</div>
			<%-- <jsp:include page="/views/main/main_personal_left.jsp" /> --%>
            <div class="rightlist">
            <input type="hidden" id="item" value="${sessionScope.item_personal}"/>
		          <div class="my-order-detail">
		              <div class="padd1">
                          <span class="title-left" style="font-weight:bold;color: #858585;" >订单详情</span>
                          <span class="title-right" style="font-weight:bold;">
                              <c:if test="${orderInfo.state == 14 }">配送已送达</c:if>
                              <c:if test="${orderInfo.state == 0 }">待付款</c:if>
                              <c:if test="${orderInfo.state == 3 }">配送中</c:if>
                              <c:if test="${orderInfo.state == 9 }">待消费</c:if>
                              <c:if test="${orderInfo.state == 1 }">待商家确认</c:if>
                              <c:if test="${orderInfo.state == 2 }">待发货</c:if>
                              <c:if test="${orderInfo.state == 4 }">已完成</c:if>
                              <c:if test="${orderInfo.state == 5 }">订单已取消</c:if>
                              <c:if test="${orderInfo.state == 6 }">退款申请</c:if>
                              <c:if test="${orderInfo.state == 7 }">退款已确认</c:if>
                              <c:if test="${orderInfo.state == 8 }">退款完成</c:if>
                              <c:if test="${orderInfo.state == 10 }">退货申请</c:if>
                              <c:if test="${orderInfo.state == 11 }">退货已确认</c:if>
                              <c:if test="${orderInfo.state == 12 }">退货已完成</c:if>
                              <c:if test="${orderInfo.state == 13 }">退货已拒绝</c:if>
                          </span>
		              </div>
                      <div class="line"></div><!--border-top:1px dashed #57B4C6;height: 1px;overflow:hidden-->
		              <div class="receiveGoods">
		                  <div class="receivePerson">收货人：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${orderInfo.contactor}</div>
		                  <div class="address">收货地址：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${orderInfo.contactorAddress}</div>
		                  <div class="receivePersonPhone">收货人电话：&nbsp;${orderInfo.contactorPhone}</div>
		                  <%-- <div class="shopMsg">卖家留言：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${orderInfo.shopMsg}</div> --%>
		              </div>
		              <c:if test="${orderInfo.orderLevel == 2 }">
			              <div class="shop-name">
			              	  <c:if test="${orderInfo.type == 1 }">
	                          	  <span class="shopName">${orderInfo.shopName}&nbsp;&nbsp;&nbsp;&gt;</span>
	                          </c:if>
	                          <c:if test="${orderInfo.type == 2 }">
	                          	  <span class="shopName">积分商品&nbsp;&nbsp;&nbsp;&gt;</span>
	                          </c:if>
	                          <c:if test="${orderInfo.type == 3 }">
	                              <span class="shopName">秒杀商品&nbsp;&nbsp;&nbsp;&gt;</span>
	                          </c:if>
	                          <c:if test="${orderInfo.type == 1 }">
			              	  <span class="shopPhone">商家电话：${orderInfo.shopPhone}</span>
			              	  </c:if>
			              </div>
		              </c:if>
		              <div class="order-list">
                        <div style="height: auto">
                            <div class="order-body">
                                <div class="cart-table-th">
                                    <div class="wp">
                                        <div class="orderNumber" style="display:inline"> 订单号：${orderInfo.orderNumber}</div>
                                        <div class="orderTime" style="display:inline"> 下单时间：<fmt:formatDate value="${orderInfo.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
                                        </div>
                                    </div>
                                </div>
                                <div class="order-content">
                                    <div class="one-shop-all-item">
                                        <c:forEach items="${orderInfo.orderDetailList}"
                                            var="orderDetailInfo" varStatus="orderDetailStatus">
                                            <div class="one-order">
                                                <div class="padd3">
                                                    <ul class="over-flow" style="text-align:center">
                                                        <li class="td td-item">
                                                            <div class="item-pic">
                                                                <c:if test="${ not empty orderDetailInfo.goodsInfo.logo}">
	                                                                <a href="${ctx}/GoodsDetail?id=${orderDetailInfo.goodsId}&type=${orderDetailInfo.goodsInfo.type}" target="_blank">
	                                                                    <img width="70px" height="70px" src="${sessionScope.image_logo}${orderDetailInfo.goodsInfo.logo}" />
	                                                                </a>
                                                                </c:if>
                                                                <c:if test="${ empty orderDetailInfo.goodsInfo.logo}">
	                                                                <a href="${ctx}/GoodsDetail?id=${orderDetailInfo.goodsId}&type=${orderDetailInfo.goodsInfo.type}" target="_blank">
	                                                                    <img width="70px" height="70px" src="${ctx}/images/seller/common/defaultgoods.jpg" />
	                                                                </a>
                                                                </c:if>
                                                            </div>
                                                            <div class="item-info">
                                                                <p>${orderDetailInfo.goodsInfo.name}</p>
                                                                <p class="item-spc">
                                                                <c:forEach items="${orderDetailInfo.specNameValueList}"
                                                                    var="specNameValue" varStatus="specNameValueStatus">
                                                                    <p style="display:inline"><span >${specNameValue.attrName}:</span>&nbsp;
                                                                    <span>${specNameValue.attrValue}</span></p>
                                                                </c:forEach>
                                                                </p>
                                                            </div>
                                                        </li>
                                                        <li class="td td-amount">${orderDetailInfo.amount}</li>
                                                        <li class="td td-price">
                                                            <span class="price-now">￥${orderDetailInfo.price}</span>
                                                        </li>
                                                        
                                                        <li class="td td-op">
                                                        <c:if test="${orderInfo.state == 4 || orderInfo.state == 6 || orderInfo.state == 7 || orderInfo.state == 8 || orderInfo.state == 10 || orderInfo.state == 11 || orderInfo.state == 12 || orderInfo.state == 13 }">
                                                            <a href="javaScript:comment(${orderDetailInfo.goodsId},${orderInfoId});" >
	                                                                    <img style="vertical-align: -12px;" src="${ctx }/images/mall/orderpingjia.png" />
	                                                                </a>
                                                        </c:if>
                                                        </li>
                                                        
                                                    </ul>
                                                </div>
                                            </div>
                                        </c:forEach>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                      
						  <div class="allDetail">
							  <c:if test="${orderInfo.state == 3 || orderInfo.state == 14 || orderInfo.state == 4}">
							  		<p><span >配送员：${senderName}</span><span style="float:right;padding-right:70px">配送电话：${senderAccountPhone}</span></p>
							  		<div style="color:gray;border-bottom:1px"><hr/></div>
							  </c:if>
							  <c:if test="${orderInfo.payType == 1}">
							  		<p >支付方式：支付宝</p>
							  		<div style="color:gray;border-bottom:1px"><hr/></div>
							  </c:if>
							  <c:if test="${orderInfo.payType == 2}">
							  		<p >支付方式：微信</p>
							  		<div style="color:gray;border-bottom:1px"><hr/></div>
							  </c:if>
							  <c:if test="${orderInfo.payType == 3}">
							  		<p >支付方式：贝壳支付</p>
							  		<div style="color:gray;border-bottom:1px"><hr/></div>
							  </c:if>
							  <c:if test="${orderInfo.state == 3 || orderInfo.state == 14 || orderInfo.state == 4 || orderInfo.state == 9}">
							  <c:if test="${orderInfo.isBySelf == 1}">
							  		<p >配送方式：配送</p>
							  		<div style="color:gray;border-bottom:1px"><hr/></div>
							  </c:if>
							  <c:if test="${orderInfo.isBySelf == 0}">
							  		<p >配送方式：自提</p>
							  		<div style="color:gray;border-bottom:1px"><hr/></div>
							  </c:if>
							  <c:if test="${orderInfo.isBySelf == 3}">
							  		<p >配送方式：无配送</p>
							  		<div style="color:gray;border-bottom:1px"><hr/></div>
							  </c:if>
							  </c:if>
							  <table style="float:right;">
							  <tr><td align="right">商品总额：</td ><td align="right">￥${orderInfo.totalPrice}</td></tr>
							  <tr><td align="right">+运费：</td><td align="right">￥${orderInfo.carriage}</td></tr>
							  <tr><td align="right">-商品优惠：</td ><td align="right">￥${orderInfo.couponPrice}</td></tr>
							  <tr class="finalPrice"><td align="right">实付款：</td><td align="right" style="color:#FB8641;">￥${orderInfo.finalPrice}</td></tr>
							  </table>
						  </div>
						  <div style="margin-top:200px;margin-bottom:60px"><a class="back" title="返回" onclick="backMyOrder();">&lt;&lt;&nbsp;返回</a></div>
						  <!--  <div style="float:left;">
							  <c:if test="${orderInfo.state == 9 || orderInfo.state == 14 }">
							  		<a  title="确认收货" onclick="back();">确认收货</a>
			                  </c:if>
						  </div>-->
		              </div>
		           </div>
             </div>
         </div>	
     
     
<!--      用这种布局写
     <table>
     	<tr>
     		<td>订单号</td>
     		<td></td>
     	</tr>
     	<tr>
     		<td>
     			<div>
     				<div><img src="../image/"></div>
     				<div>
     					<p>newbalance</p>
     					<p>颜色：红色；    尺码：36</p>
     				</div>
     				<div class="amount">
     					1
     				</div>
     			</div>
     		</td>
     		<td><span>￥699</span></td>
     		<td><button>商品评价</button></td>
     	</tr>
     	<tr>
     		<td colspan="2">配送员:张三</td>
     		<td>支付方式 ：支付宝</td>
     		<td>配送方式：自提</td>
     	</tr>
     	<tr>
     		<td colspan="2">商品总额：</td>
     		<td colspan="2">运费：</td>
     	</tr>
     </table>
     --> 
	<jsp:include page="/views/common/footer.jsp" />
	<script src="${ctx}/js/lib/layer/layer.js"></script>
	<script src="${ctx}/js/lib/jquery.JPlaceholder.js"></script>
	<script type="text/javascript">
		var ctx = '${ctx}';
		setCtx(ctx);
	</script>
	<!-- 解决ie 6 7 8 9不能显示placeholder的问题 -->
<script src="${ctx}/js/lib/jquery.JPlaceholder.js"></script>	
</body>
</html>

